package com.sunny.core.service;

import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 通用接口
 */
@Service
public interface IBaseService<T> {

    T selectByKey(Object key);
    
    int save(T entity);

    int delete(Object key);

    int updateAll(T entity);

    int updateNotNull(T entity);

    List<T> selectByExample(Object example);

    //TODO 其他...
    
    List<T> select(T entity);
    
    int updateByPrimaryKey(T entity);

    int updateByPrimaryKeySelective(T entity);
    
    T selectByPrimaryKey(T entity);
}
